package norbert.utils {
	/* IMPORTS */
	
	import flash.events.Event;
	
	import mx.logging.*;
	
	import norbert.flickr.io.FlickrService;
	
	public class SendService extends EventHandler {
		/* PROPERTIES */
		
		private static var logger: ILogger = Log.getLogger("norbert.utils.SendService");
		
		public var active: Boolean = true;
		public var service: FlickrService;

		/* METHODS */

		override protected function listener(event: Event): void {
			if (!active) return;
			if (!service) logger.fatal("No service provided: {0}", this);
			
			service.send();
		}
		
	}
}
